package com.li.thread;

import com.li.singleton.SingletonPatternByDCL;

import java.util.concurrent.Callable;

/**
 * 多线程-用于测试高并发环境下是否线程安全
 */
public class MyThread implements Callable<String> {

    @Override
    public String call() {
        //单例模式
        SingletonPatternByDCL singletonPattern = SingletonPatternByDCL.getInstanceByDCL();
        return singletonPattern.toString() + singletonPattern.messageSay();
    }
}
